package com.greenhouse.controller;

import com.greenhouse.mqtt.MqttService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/mqtt")
public class MqttController {

    private MqttService mqttService;

    @RequestMapping("/send")
    public void send(@RequestParam String topic, @RequestParam String message) {
        System.out.println(topic + ": " + message);
    }
}
